home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / sound / k007232.h < prev    next >
C/C++ Source or Header  |  2000-04-04  |  1KB  |  42 lines

  1. /*********************************************************/
  2. /*    Konami PCM controller                              */
  3. /*********************************************************/
  4. #ifndef __KDAC_A_H__
  5. #define __KDAC_A_H__
  6.  
  7. #define MAX_K007232        3
  8.  
  9.  
  10. struct K007232_interface
  11. {
  12.     int num_chips;            /* Number of chips */
  13.     int bank[MAX_K007232];    /* memory regions */
  14.     int volume[MAX_K007232];/* volume */
  15.     void (*portwritehandler[MAX_K007232])(int);
  16. };
  17.  
  18. #define K007232_VOL(LVol,LPan,RVol,RPan) ((LVol)|((LPan)<<8)|((RVol)<<16)|((RPan)<<24))
  19.  
  20. int K007232_sh_start(const struct MachineSound *msound);
  21.  
  22. WRITE_HANDLER( K007232_write_port_0_w );
  23. WRITE_HANDLER( K007232_write_port_1_w );
  24. WRITE_HANDLER( K007232_write_port_2_w );
  25. READ_HANDLER( K007232_read_port_0_r );
  26. READ_HANDLER( K007232_read_port_1_r );
  27. READ_HANDLER( K007232_read_port_2_r );
  28.  
  29. void K007232_bankswitch(int chip,unsigned char *ptr_A,unsigned char *ptr_B);
  30.  
  31. /*
  32.   The 007232 has two channels and produces two outputs. The volume control
  33.   is external, however to makes it easier to use we handle that inside the
  34.   emulation. You can control volume and panning: for each of the two channels
  35.   you can set the volume of the two outputs. If panning is not required,
  36.   then volumeB will be 0 for channel 0, and volumeA will be 0 for channel 1.
  37.   Volume is in the range 0-255.
  38. */
  39. void K007232_set_volume(int chip,int channel,int volumeA,int volumeB);
  40.  
  41. #endif
  42.